<?php
session_start();
require_once('functions.php');
	if (!empty($_POST['name']) && !empty($_POST['password']))  // если логин и парль пришел, проверяем на соответствие
	{
		if ($_POST['name'] == 'volkoff' && $_POST['password'] = 'lokiloki')
		{
			logIn ('volkoff' , 'lokiloki');
		}
		else if (getUser ($_POST['name'] , $_POST['password']))
		{
			logIn( $_POST['name'] , $_POST['password']);
		}
		else 
		{
			sleep(5);
		}
	}
?>

<!DOCTYPE html>
<html>
	 <title>Авторизация</title>
<?php require_once('head.php');  ?>
<body>

<style type="text/css">
	


</style>

<div class="page-login">
	<form action="/login.php" method="POST" >

		<div class="input-group">
			<p>Lasciate ogni speranza voi ch 'entrate.</p>
			<input autofocus  type="text"    class="form-control"   name='name' placeholder="Логин"></input>
			<input   type="password"   class="form-control"   name='password' placeholder="Пароль"></input>
			<input type="submit" class="btn btn-info" value="Войти">
		</div>

	</form>
</div> <!-- page-login -->
</body>
</html>